package com.ruoyi.app.controller.member.mapper;

import com.ruoyi.common.core.dao.BaseMapper;
import com.ruoyi.common.entity.DO.member.MemberVipBenefitDO;
import com.ruoyi.common.entity.DO.member.MemberVipBenefitExtDO;
import com.ruoyi.common.entity.VO.member.MemberVipBenefitVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

public interface IMemberVipBenefitExtMapper extends BaseMapper<MemberVipBenefitExtDO> {
    @Select("SELECT benefit_discount_rate FROM member_vip_benefit_ext where member_id=#{memberId} and product_id=#{productId} and is_enable=1 and is_delete=0 LIMIT 1")
    BigDecimal getBenefitDiscountRate(@Param("memberId") Long memberId, @Param("productId") Long productId);

}
